<div class="content">
	<?php
	$tools = array();
	//$tools[] = n_ui(n_url('passport','confEdit'),'设置');
	echo n_mod('skin')->pageHead("REDIS列表",$tools)
	?>

	<div class="n-sep">
<?php
if(!empty($data)){

$key = $data['key'];
$val = $data[$key];

?>
<form action="/redis.html">
			
				<?php foreach($data['instances'] as $k =>$v) {?>
					<input value="<?=$k?>" name="key" type="radio" <?=$k == $key ? 'checked=checked' : ''?>><?=$k?>【<?=$v['host']?>:<?=$v['port']?>】
				<?php }?>
			
			<input type="submit"/>
		</form>
	<dl class="n-box n-sep-bottom">
		<dt class="n-box-head">
			<span class="n-right">
				<?=n_ui(n_url('redis','showvar',array('id'=>$key)),'查看变量',"class='n-href n-btn n-btn-ccc'")?>
			</span>
			
			<?=$key?>【<?=$val['conf']['host']?>:<?=$val['conf']['port']?>】
		</dt>
		<dd class="n-box-body n-sep">
			
			<table class="n-table n-size-full">
				<tbody>
				<tr>
					<th>KEYS</th>
					<th>数据类型</th>
					<th>数据量</th>
					<th>操作</th>
				</tr>		
				<?php
				if(!empty($val['items'])){
					foreach($val['items'] as $key1=>$val1){
				?>
				<tr>
					<td><?=$val1['key']?></td>
					<td><?=$val1['type']?></td>
					<td><?=$val1['len']?></td>
					<td>
						<?=n_ui(n_url('redis','itemData',array('handle'=>$key,'id'=>$val1['key'])),"查看")?>
						<?=n_ui(n_url('redis','itemDel',array('handle'=>$key,'id'=>$val1['key'])),"删除")?>
					</td>
				</tr>
				<?php
					}
				}
				?>
				</tbody>
			</table>

			
		</dd>
	</dl>
<?php
}
?>
	</div>
</div>